/* 
 * AUTHOR: Kevin Lam
 */


package com.apps.outgoing;

import java.io.IOException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;

public class EmailNotifyServlet extends HttpServlet {

	private EmailNotifier en;

	private String email;
	private String dept;
	private String course;
	private String section;

	public void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
		email = req.getParameter("email");
		dept = req.getParameter("dept");
		course = req.getParameter("course");
		section = req.getParameter("section");
		en = new EmailNotifier();
		EmailNotifier.sendMessage(email, dept + course + section);
	}
}
